import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bmfmap_example/tool/tool.dart';
import 'package:flutter_svg/svg.dart';

class FamilyCard extends StatefulWidget {
  FamilyCard({ Key key ,this.name,this.logoid,this.haslocation}) : super(key: key);

  var name;
  var logoid;
  bool haslocation;

  @override
  _FamilyCardState createState() => _FamilyCardState();
}

class _FamilyCardState extends State<FamilyCard> {
  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.all(8),
      width: 160,
      child: Row(
        children: [
          Image.asset(Tool.getportrait(widget.logoid),width: 48,),
          SizedBox(width: 16,),
          Text(widget.name),
          Spacer(),
          SvgPicture.asset(
                    "assets/images/icons/svg/backlocation.svg",
                    color: Colors.black54,
                    width: 32,
                  ),
        ],
      ),
    );
  }
}